Skip to content

Conversation

sommeeeer
Copy link
Contributor

@sommeeeer sommeeeer commented Jun 17, 2025

For opennextjs/opennextjs-cloudflare#684

We need to ensure that the response doesn't return a body if its a status code that does not allow it. (101, 204, 205, 304).

Here is a reproduction I made for that issue. To run the reproduction just pnpm install && pnpm preview. Then in another terminal you curl -i http://localhost:8787/src2.

We could fix this inside the overrides/proxyExternalRequest/fetch.ts aswell. We would just return the body as is, and not fallback to emptyReadableStream(). Not sure what would be preferred? I dont think emptyReadableStream() has any effect in this converter.

Copy link

changeset-bot bot commented Jun 17, 2025

🦋 Changeset detected

Latest commit: e14a354

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Jun 17, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/@opennextjs/aws@906

commit: e14a354

Copy link
Contributor

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one little change and it should be good

@sommeeeer sommeeeer requested a review from conico974 June 17, 2025 16:18
Copy link
Contributor

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks

@conico974 conico974 merged commit c5421fa into opennextjs:main Jun 17, 2025
3 checks passed
@sommeeeer sommeeeer deleted the fix-fetch-proxy-null-body branch June 17, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants